package com.hzjq.encrypt.adapter

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.hzjq.encrypt.R
import com.hzjq.encrypt.bean.Sbbhs

class QbqAdapter : BaseQuickAdapter<Sbbhs,BaseViewHolder> {

    constructor(data: MutableList<Sbbhs>?) : super(R.layout.item_qbq_layout, data)

    override fun convert(holder: BaseViewHolder, item: Sbbhs) {
        holder.setText(R.id.qbqItemText,item.sbbh)
        holder.getView<TextView>(R.id.lgItemDeleteText)
            .setOnClickListener {
                getOnItemChildClickListener()?.onItemChildClick(this,it,holder.adapterPosition)
            }
        holder.getView<TextView>(R.id.lgItemEditorText)
            .setOnClickListener {
                getOnItemChildClickListener()?.onItemChildClick(this,it,holder.adapterPosition)
            }
        item.position = holder.adapterPosition
    }
}